Quick access panel for displayng a web page on a mobile device

ABSTRACT

Embodiments of displaying a web page on a mobile device are provided. An aspect includes acquiring user interface elements that have a quick access attribute in the web page. Another aspect includes generating a quick access panel of the user interface elements having the quick access attributes, wherein a visible transparency of the generated quick access panel is not below a predetermined threshold.

CROSS-REFERENCE TO RELATED APPLICATION

The present application claims priority to Chinese Patent Application No. 201210086448.0, filed on Mar. 28, 2012, and all the benefits accruing therefrom under 35 U.S.C. §119, the contents of which in its entirety are herein incorporated by reference.

BACKGROUND

This disclosure relates generally to mobile computing, and more specifically, to a quick access panel for displaying a web page on a mobile device.

As mobile devices with touch screen as input means become popular, various types of applications applicable to tablet electronic devices have been developed. In contrast to an electronic device that uses input means such as keyboard, mouse etc., a mobile device with touch screen as input means needs a user to use his/her finger to operate the screen for inputting. That is, a user may need to operate the mobile device while holding it. If size of the touch screen of the mobile device is large, frequently moving location of the finger for inputting is often not convenient. This problem gets even worse when the mobile device with touch screen as input means is used to browse a web page. Since web page browsing needs a great deal of interaction between the user and the mobile device, efficiency is usually not high.

SUMMARY

Methods, systems, and computer program products for displaying a web page on a mobile device are provided. An aspect includes acquiring user interface elements that have a quick access attribute in the web page. Another aspect includes generating a quick access panel of the user interface elements having the quick access attributes, wherein a visible transparency of the generated quick access panel is not below a predetermined threshold.

Additional features are realized through the techniques of the present exemplary embodiment. Other embodiments are described in detail herein and are considered a part of what is claimed. For a better understanding of the features of the exemplary embodiment, refer to the description and to the drawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

Referring now to the drawings wherein like elements are numbered alike in the several FIGURES:

FIG. 1 shows a block diagram of an exemplary computer system for displaying a web page on a mobile device;

FIG. 2 shows a flowchart of a method for displaying a web page on a mobile device in accordance with an embodiment;

FIG. 3 shows a block diagram of a system for displaying a web page on a mobile device in accordance with an embodiment; and

FIGS. 4 a-4 b shows a DOM tree structure corresponding to exemplary web page codes and sequence of traversing that DOM tree structure.

DETAILED DESCRIPTION

Embodiments of a quick access panel for displaying a web page on a mobile device are provided, with exemplary embodiments being discussed below in detail with reference to the accompanying drawings. According to an embodiment, there is provided a method for displaying a web page on a mobile device, comprising: acquiring user interface elements with quick access attributes in the web page; generating a quick access panel by using the user interface elements with quick access attribute, wherein the visible transparency of the generated quick access panel is not below a predetermined threshold. According to another embodiment, the method for displaying a web page on a mobile device comprises setting transparency of the quick access panel to be below the predetermined threshold in response to detecting input of a specific gesture.

According to an embodiment, there is provided a system for displaying a web page on a mobile device, comprising: an acquiring unit configured to acquire user interface elements with quick access attribute in the web page; a generating unit configured to generate a quick access panel by using the user interface elements with quick access attribute, wherein transparency of the generated quick access panel is not below a predetermined threshold.

FIG. 1 shows a diagram of a computer system 100 which is applicable to implement various embodiments. As shown in FIG. 1, the computer system 100 may include: Central Processing Unit (CPU) 101, Random Access Memory (RAM) 102, Read Only Memory (ROM) 103, System Bus 104, Hard Drive Controller 105, Keyboard Controller 106, Serial Interface Controller 107, Parallel Interface Controller 108, Display Controller 109, Hard Drive 110, Keyboard 111, Serial Peripheral Equipment 112, Parallel Peripheral Equipment 113 and Display 114. Among above devices, CPU 101, RAM 102, ROM 103, Hard Drive Controller 105, Keyboard Controller 106, Serial Interface Controller 107, Parallel Interface Controller 108 and Display Controller 109 are coupled to the System Bus 104. Hard Drive 110 is coupled to Hard Drive Controller 105. Keyboard 111 is coupled to Keyboard Controller 106. Serial Peripheral Equipment 112 is coupled to Serial Interface Controller 107. Parallel Peripheral Equipment 113 is coupled to Parallel Interface Controller 108. And, Display 114 is coupled to Display Controller 109. It should be understood that the structure as shown in FIG. 1 is only for the exemplary purpose. In some cases, some devices may be added to or removed from the computer system 100 based on specific situations.

Various embodiments may comprise a system, method or computer program product. Accordingly, some embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.” Furthermore, various embodiments may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may be utilized. The computer readable medium may be a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.

Computer program code for carrying out operations for various embodiments may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).

Various embodiments are described below with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to various embodiments. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.

The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational blocks to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.

With reference now to FIG. 2, a flowchart of a method 200 for displaying a web page on a mobile device in accordance with an embodiment is shown. As shown in FIG. 2, the method 200 for displaying a web page on a mobile device in accordance with an embodiment begins with block 202. Then, the method 200 proceeds to block 204, where User Interface (UI) elements with having a quick access attribute in the web page are acquired. Usually, quick access attribute of an UI element refers to an action and/or event corresponding to that UI element, including but not limited to, quick access key (including specific key combinations for quick accessing), click, focus, select, mappable or not, draggable or not, etc. In accordance with an embodiment, a function for listening a web page load event may be defined, which may be executed in response to loading of web page codes. In accordance with an embodiment, the function first parses the loaded web page codes to generate a document object model (DOM) tree structure of the content corresponding to the web page codes. Then, the function may traverse the generated DOM tree structure to acquire UI elements with quick access attribute therein. The generated DOM tree structure may be traversed in depth first mode or breadth first mode. While the discussion below refers to a depth first mode as an example, those skilled in the art will appreciate that, breadth first mode is similar and description of which will be omitted here for brevity.

In an embodiment, the loaded web page code is as follows:

  <html>  <head>   <title>Example</title>  </head>  <body>   <div id=” content”>   <button id=”view” mappable=”true”>View</button>   </div>  </body> </html> For the above web page codes, the DOM tree structure generated through parsing the codes by the function is as shown in FIG. 4 a.

Then, a JavaScript object NodeIterator may be used to traverse through the whole DOM tree structure to search in depth first mode, starting from root node, and in turn reaching child nodes of the root node, child nodes of the child nodes until leaf nodes. Still taking the above web page codes for example, sequence of traversing through the DOM tree structure corresponding to the above web page codes by using the object NodeIterator is shown in FIG. 4 b. The object NodeIterator may be created by invoking a method “createNodeIterator” with an object document, the “createNodeIterator” method may have four parameters, which may be invoked as follows:

Document.createNodeIterator(root,whatToShow,filter,entityReferenceExpansion)

Wherein:

-   -   root: root node of DOM tree structure, and is also a starting         point for searching in depth first mode;     -   whatToShow: indicates what kind of node should be scanned;     -   filter: object NodeFilter, indicates what kind of node should be         omitted; and     -   entityReferenceExpansion: indicates whether element reference         should be expanded.

Acquiring UI elements with quick access attribute in a web page may be realized by setting the above described parameters. The above description is combined with a specific application example, however, those skilled in the art will appreciate that, these description are merely illustrative, for example, the generated DOM tree structure may be traversed in breadth first mode to acquire UI elements with quick access attribute in a web page, and any other manners in the art may also be used to achieve the purpose of acquiring UI elements with quick access attribute in a web page.

In accordance with an embodiment, traversal of the DOM tree structure corresponding to the above web page codes may be realized through the following codes so as to acquire UI elements with quick access attribute therein.

 Var iterator = document.createNodeIterator(document,  NodeFilter.SHOW_ALL, null, false);  Var node = null;  While(node) {   Node = iterator.nextNode( );   If(node has defined attribute) {   f_add_to_panel(node);  //process specific node    }   }

Next, the method 200 proceeds to block 206, wherein a quick access panel is generated that includes all the UI elements with having a quick access attribute.

In accordance with an embodiment, a framework of the quick access panel may first be generated through the following codes:

  var panel = document.createElement(‘div’); panel.style.display = ‘none’;  //hide the panel //set styles, like width/height document.appendChild(panel).

Next, UI elements corresponding to the acquired UI elements with quick access attribute in the web page are added into the framework of the quick access panel. This may be achieved by first creating UI elements in the framework of the quick access panel and then binding the UI elements with an event or creating a link to an event. For example, for a button with mappable quick access attribute, the above purpose of adding UI elements corresponding to the acquired UI elements with quick access attribute in a web page into the frame of the quick access panel may be realized through following codes: <button mappable=“true” class=“save_btn” onclick=“doSave( );”>Save</button>.

Again, for example, if that button is referenced by multiple buttons, the above purpose of adding UI elements corresponding to the acquired UI elements with quick access attribute in a web page into the frame of the quick access panel may be realized through following codes.

  var elem = document.createElement(btn.tagName); elem.className = btn.getAttribute(‘class’); elem.onclick = btn.onclick; panel.appendChild(elem);  //add element to panel

For example, for a quick access key or specific key combinations for quick accessing, this may be achieved by adding a shortcut corresponding thereto in the framework of the quick access panel.

Also, those skilled in the art will recognize that, the above description is merely illustrative, and any other manners in the art may be utilized to achieve the purpose of generating a quick access panel by using UI elements with quick access attribute.

In accordance with an embodiment, the visible transparency of the generated quick access panel is not below a predetermined threshold. The predetermined threshold may be 50%, for example. Further, the predetermined threshold may be dynamically adjusted according to brightness of an environment where the panel locates. This may be achieved by setting a display attribute of the Cascading Style Sheet (CSS) of the generated quick access panel. For example, a parameter of transparency value is added and set for the display attribute of CSS, e.g., transparency value may be 100% or 80%. Here, the purpose that transparency of the generated quick access panel is not below a predetermined threshold is to make influence on user's experience as less as possible. For example, when transparency value is 100%, a user is not aware that a quick access panel is being generated while loading the web page code, and the user's experience in browsing a web page will not be changed. Meanwhile, since a quick access panel is generated while loading the web page code, preparation has already been made for the frequent interaction been a user and a mobile device, thus it is capable of improving efficiency of interaction between the user and the mobile device.

Further, in accordance with another embodiment, the method 200 for displaying a web page on a mobile device further comprises a block 208, in which whether input of a specific gesture is detected is judged. If input of a specific gesture is detected, the method 200 proceeds to block 210, in which the quick access panel is displayed at a location where input of the specific gesture is detected. Gesture detection may be realized by using prior art, and the detected gesture is compared to a predetermined specific gesture, if match, then input of a specific gesture is considered to be detected and a quick access panel is displayed at a location where input of the specific gesture is detected in response to the match. The quick access panel may be displayed by using the location where input of the specific gesture is detected as central location of the quick access panel. Also, the quick access panel may be displayed by using the location where input of the specific gesture is detected as a start or end location of the quick access panel. Next, the method 200 proceeds to block 212, where transparency of the generated quick access panel is set to be below the predetermined threshold, which may be 50%, for example. This may be achieved by setting a display attribute of the CSS of the generated quick access panel. For example, a parameter of transparency value is added and set for the display attribute of CSS, e.g., transparency value may be 0% or 20%. As such, since the quick access panel is displayed at or near a location where user inputs a specific gesture, it is an optimal location for the user. Thus, efficiency of interaction between the user and the mobile device can be further improved.

In accordance with another embodiment, the method 200 for displaying a web page on a mobile device comprises: transparency of the quick access panel is reset to be not below the predetermined threshold in response to detecting a specific event. Here, the specific event is that input of a second specific gesture is detected, or that a predetermined amount of time has elapsed. Other events may also be employed as the specific event, which will not be described here for brevity. By using the above manner, influence of a quick access panel on user's experience in browsing a web page may be reduced.

With reference now to FIG. 3, a block diagram of a system 300 for displaying a web page on a mobile device in accordance with an embodiment is shown. The system 300 for displaying a web page on a mobile device in accordance with an embodiment comprises: an acquiring unit 302 configured to acquire user interface elements with quick access attribute in the web page; a generating unit 304 configured to generate a quick access panel by using the user interface elements with quick access attribute; wherein, transparency of the generated quick access panel is not below a predetermined threshold.

In accordance with an embodiment, the system 300 further comprises: a displaying unit 306 configured to display the quick access panel at a location where input of a specific gesture is detected in response to detecting input of the specific gesture. In accordance with another embodiment, the system 300 further comprises: a setting unit 308 configured to set transparency of the quick access panel to be below the predetermined threshold. In accordance with an embodiment, the setting unit is configured to reset the transparency of the quick access panel to be not below the predetermined threshold in response to detecting a specific event, wherein the specific event is that input of a second specific gesture is detected, or that a predetermined amount of time has elapsed. Of course, other events may also be employed as the specific event, which will not be described here for brevity.

The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms “a”, “an”, and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, blocks, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, blocks, operations, elements, components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of all means or block plus function elements in the claims below are intended to include any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the invention. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated. 

1. A method for displaying a web page on a mobile device, comprising: acquiring user interface elements that have a quick access attribute in the web page; and generating a quick access panel of the user interface elements having the quick access attributes, wherein a visible transparency of the generated quick access panel is not below a predetermined threshold.
 2. The method according to claim 1, further comprising: displaying the quick access panel at a location at which an input of a specific gesture is detected based on detecting input of the specific gesture.
 3. The method according to claim 2, further comprising: setting the visible transparency of the quick access panel to be below the predetermined threshold.
 4. The method according to claim 3, further comprising: resetting the visible transparency of the quick access panel to be not below the predetermined threshold in response to detecting a specific event.
 5. The method according to claim 4, wherein the specific event comprises detection of input of a second specific gesture.
 6. The method according to claim 4, wherein the specific event comprises elapsing of a predetermined amount of time.
 7. The method according to claim 1, wherein the quick access panel comprises a cascading style sheet (CSS).
 8. A system for displaying a web page on a mobile device, comprising: an acquiring unit configured to acquire user interface elements having a quick access attribute in the web page; a generating unit configured to generate a quick access panel of the user interface elements with the quick access attributes, wherein a visible transparency of the generated quick access panel is not below a predetermined threshold.
 9. The system according to claim 8, further comprising: a displaying unit configured to display the quick access panel at a location at which an input of a specific gesture is detected based on detecting input of the specific gesture.
 10. The system according to claim 9, further comprising: a setting unit configured to set the visible transparency of the quick access panel to be below the predetermined threshold.
 11. The system according to claim 10, wherein: the setting unit is configured to reset the visible transparency of the quick access panel to be not below the predetermined threshold in response to detecting a specific event.
 12. The system according to claim 11, wherein the specific event comprises detection of input of a second specific gesture.
 13. The system according to claim 11, wherein the specific event comprises elapsing of a predetermined amount of time.
 14. The system according to claim 9, wherein the quick access panel comprises a cascading style sheet (CSS).
 15. A computer program product for displaying a web page on a mobile device, the computer program product comprising: a computer readable storage medium having computer readable program code embodied therewith, the computer readable program code comprising computer readable program code configured to: acquire user interface elements that have a quick access attribute in the web page; and generate a quick access panel of the user interface elements having the quick access attributes, wherein a visible transparency of the generated quick access panel is not below a predetermined threshold.
 16. The computer program product according to claim 15, further comprising: displaying the quick access panel at a location at which an input of a specific gesture is detected based on detecting input of the specific gesture.
 17. The computer program product according to claim 16, further comprising: setting the visible transparency of the quick access panel to be below the predetermined threshold.
 18. The computer program product according to claim 17, further comprising: resetting the visible transparency of the quick access panel to be not below the predetermined threshold in response to detecting a specific event.
 19. The computer program product according to claim 18, wherein the specific event comprises detection of input of a second specific gesture.
 20. The computer program product according to claim 18, wherein the specific event comprises elapsing of a predetermined amount of time. 